let express = require('express');
let multiparty = require('multiparty');
let app = new express();
let admin = require('./routes/admin');

app.set("view engine","ejs");
app.use(express.static('public'));
app.use('/loadImg',express.static("loadImg"));
let session = require("express-session");
//配置session中间件
app.use(session({
    secret: 'keyboard cat',
    resave: false,
    saveUninitialized: true,
    cookie: {
        maxAge:1000*60*30
    }, //只有在https协议下才能访问cookie
    rolling:true
}));

app.use('/admin',admin);


app.listen(3003,'127.0.0.1');